package com.peanut.huibutie.common;


import com.peanut.huibutie.entity.UserVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class UserContext {
    // demo演示使用。实际应用中，需要借助当前会话和分布式缓存框架来持久化
    private static UserVO context;

    public UserVO getContext() {
        return context;
    }

    public void setContext(UserVO context) {
        this.context = context;
        log.info("设置用户会话，入参={}",context);
    }
}
